package com.lejin.item.controller;


import com.lejin.item.entity.CourseComment;
import com.lejin.item.service.impl.CourseCommentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luminghua
 * @since 2022-04-20
 */
@RestController
@RequestMapping("/item/course-comment")
public class CourseCommentController {

    @Autowired
    CourseCommentServiceImpl commentService;
    @RequestMapping("findAllCommentAndUserByOutlineId/{oid}")
    public List<CourseComment> findAllCommentAndUserByOutlineId(@PathVariable Integer oid){
        List<CourseComment> allCommentAndUserByOutlineId = commentService.findAllCommentAndUserByOutlineId(oid);

        return allCommentAndUserByOutlineId;
    }

}
